﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI
{
    public partial class Menu : P_MenuDesign
    {
        public Menu()
        {
            InitializeComponent();
        }

            
        private void Menu_Load(object sender, EventArgs e)
        {  
            
        }
        private void ordreoversigtToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void opretOrdreToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.HentOpretOrdre(this.MdiParent);

        }

        private void opdaterOrdreToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.HentRedigerOrdre(this.MdiParent);
        }

        private void sletOrdreToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void arbejdskortToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master m = new Master();
            m.HentArbejdsOversigt(this.MdiParent);
        }

        private void ufakturetOrdrToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.HentBetaltFaktura(this.MdiParent);
        }

        private void ubetalteFakturaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.HentBetaltFaktura(this.MdiParent);
        }

        private void betalteFakturaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
        }

        private void kundeoversigtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.HentKundeoversigt(this.MdiParent);
            //Form f = new OpretKunde(true);
            //f.StartPosition = FormStartPosition.CenterScreen;
            //f.Width = 447;
            //f.Height = 429;
            //f.Show();

            //Form f = new OpretScooter(true);
            //f.StartPosition = FormStartPosition.CenterScreen;
            //f.Width = 266;
            //f.Height = 265;
            //f.Show();

        }

        private void vareomsætningToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void produktivitetToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void omsætningshastighedToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void resevereToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Master master = (Master)this.MdiParent;
            //master.UdlejScooter(this.MdiParent);
            
            //Form f = new P_Udlejning();
            //f.Show();
        }

        private void opdatereUdlejningToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.OpdaterUdlejScooter(this.MdiParent);
        }

        private void sletteUdlejningToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void regnskabToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void finansToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void opdatereHjemmesideToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void udsendNyhedsmailToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void opretVareToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void opretVarekatagoriToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void opdatereVareToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void opdatereVarekatagoriToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void sletVareToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void sletVarekategoriToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void afslutToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            
        }

        private void udlejningToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.OpdaterUdlejScooter(this.MdiParent);
        }

        private void fakturaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Master master = (Master)this.MdiParent;
            master.HentBetaltFaktura(this.MdiParent);
        }

        private void afslutprogramToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string message = "Du er ved at lukke SBS ned, alt data der ikke er gemt - vil blive tabt og kan ikke genskabes - ønsker du at forsætte ??";
            string caption = "ADVARSEL !!!";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            DialogResult result;
            MessageBoxIcon w = MessageBoxIcon.Warning;

            result = MessageBox.Show(message, caption, buttons, w);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                Master master = (Master)this.MdiParent;
                master.LukParent();

            }
        }
    }
}
